package com.fjl.filewriter;

import java.io.File;
import java.io.IOException;

import com.fjl.filewriter.PackerNg.Helper;

public class ReadApkMsg
{

	public static void main(String[] args)
	{
//		File file = new File("F:/三调外业测试.apk");// apk文件路径
//		File file = new File("F:/移动一张图.apk");// apk文件路径
//		File file = new File("F:/MapGISExplorer.apk");// apk文件路径
//		File file = new File("F:/三调外业测试.apk");// apk文件路径
//		File file = new File("F:/myapplication-release.apk");// apk文件路径
//		File file = new File("F:/第三次土地利用外业调查系统20180817修改后.apk");// apk文件路径
//		File file = new File("F:/MapGISCollector.apk");// apk文件路径
//		File file = new File("C:/第三次土地利用外业调查系统20180816未上传.apk");// apk文件路径
		File file = new File("F:/MapGISExplorer.apk");// apk文件路径
		try
		{
//			String market = "031446db-b69e-48ad-b04d-2ea89e03bf50\n"+"http://www.smarnet.com.cn/CDSService/GetAuthService.aspx";
//			Helper.writeMarket(file, market);
			String strCloudSerialNum = Helper.readMarket(file);
			System.out.println(strCloudSerialNum);
			String[] strs = strCloudSerialNum.split("/n");
			System.out.println(strs[0]);
			
			if(strs.length == 2)
			{
				System.out.println(strs[1]);
			}
			else if(strs.length > 2)
			{
				System.out.println(strs[1]);
				System.out.println(strs[2]);
			}
			else
			{
				System.out.println("nothing");
			}
			
		}
		catch (IOException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
